<?php
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>验证码测试</title>
</head>
<body>
<form action="test.php" method="post">
    姓名：<input name="username" type="text" /><br/>
    密码：<input name="password" type="password"/><br/>
    验证码：<input name="code" type="text"/><br/>
     <img src="code.php" onclick="this.src='code.php?'+Math.random()"/>
     <input type="submit" value="提交"/>
</form>
</body>
</html>